Open
Conversation
0eb3475 to
7c1c574
Compare
75fdba5 to
527d5b9
Compare
test262: 87 failures (94.5%), 82s runtime
Session progress: 91 → 87 = 4 tests fixed Array.prototype[Symbol.iterator] fix resolved the iter-get-err tests. try/finally double-execution investigation ongoing. 94.5% pass rate (1,495 / 1,582)
Fix catch_js_throw and catch_js_throw_refresh_globals to use explicit try/catch around fun.() only, preventing the function- level catch from intercepting throws from run(pc+1,...) continuation. This is a correctness fix that prevents accidental catch of throws from subsequent opcode execution. Combined with the Array.prototype Symbol.iterator fix, resolves 4 additional tests. test262: 87 failures (94.5% pass rate, 1,495 / 1,582)
Separate Put.put from run(pc+1,...) in put_field's try/catch block.
Previously, the try block wrapped both the operation AND the
continuation, causing throws from subsequent opcodes to be caught
with a stale ctx and re-dispatched via throw_or_catch. This caused
the finally block to execute twice when the catch body re-threw.
Fix: wrap only Put.put in try, use :ok/{:throw,error} result tuple
for branching. The continuation run(pc+1,...) executes AFTER the
try block, so subsequent throws propagate naturally to the function-
level catch_js_throw_refresh_globals handler.
test262: 87 → 85 (2 tests fixed: completion-values-fn-finally)
94.6% pass rate (1,497 / 1,582)
Custom iterators on objects now get correct 'this' binding when called from for..of loops. Fixes non-generator custom iterators. Generator this binding is a separate issue. Also fix invoke_custom_iterator in both interpreter and compiled runtime_helpers to use invoke_with_receiver. test262: 85 failures (94.6% pass rate, 1,497 / 1,582)
Compiled path's compiled_gen_invoke doesn't preserve 'this' in generator continuations. Fix: compiled_method_callable? only returns true for func_kind=0 (regular functions), forcing generators/async to use the interpreter path which correctly passes 'this' through the context. test262: 85 → 81 (4 tests fixed: all iter-val-array-prototype) 94.9% pass rate (1,501 / 1,582)
1. Bytecode decoder: encode lone surrogates (U+D800-U+DFFF) as CESU-8 (3-byte) instead of returning error tuples. This allows JS strings with unpaired surrogates to be stored as binaries. 2. String comparison: implement utf16_compare that converts strings to UTF-16 code unit sequences for comparison. JS compares by UTF-16 code units, not UTF-8 bytes. Supplementary characters (U+10000+) encode as surrogate pairs (D800-DBFF) which sort BEFORE BMP chars in UTF-16 but AFTER in UTF-8. 3. Fast path: strings without bytes >= 0xED use direct binary comparison (UTF-8 and UTF-16 give same order for BMP-only). test262: 81 → 77 (4 tests fixed: all surrogate comparison tests) 95.1% pass rate (1,505 / 1,582)
1. instanceof: use Get.get for Symbol.hasInstance (invokes accessor
getters from defineProperty). Use catch_js_throw_refresh_globals
for globals propagation. Check {:obj,_} callable via 'call' property.
2. Unicode: CESU-8 encoding for lone surrogates + UTF-16 code unit
comparison for strings with supplementary characters.
3. Generator this: compiled_method_callable only for func_kind=0
(regular functions), generators use interpreter path.
4. Function.prototype.constructor set during globals init.
5. Array.prototype[Symbol.iterator]: check for deletion/override,
invoke_with_receiver for this binding, separate put_field try/catch.
test262: 91 → 75 (16 tests fixed this session)
95.3% pass rate (1,507 / 1,582)
When closures have accessor properties set via Object.defineProperty
(stored in ctor_statics), get_own now invokes the getter instead of
returning the raw {:accessor, ...} tuple.
test262: 75 failures (95.3% pass rate, 1,507 / 1,582)
Use Get.get instead of raw Map.get for reading 'done' and 'value' from iterator result objects. This properly invokes accessor getters set via Object.defineProperty on iterator results. test262: 75 → 73 (2 tests fixed: spread-err-*-itr-value timeout) 95.4% pass rate (1,509 / 1,582)
Values.shr matched shr(_, {:bigint, _}) before shr({:obj, _}, b),
causing TypeError to fire before ToPrimitive could throw the
correct error. Move object coercion clauses before BigInt clauses.
test262: 73 → 72 (bigint-toprimitive.js fixed)
95.4% pass rate (1,510 / 1,582)
Result: {"status":"keep","failures":72,"passing_tests":1510,"skipped_tests":912}
…ch handlers, extract for_of_start throws to throw_or_catch
Result: {"status":"keep","failures":68,"passing_tests":1514,"skipped_tests":912}
Result: {"status":"keep","failures":68,"passing_tests":1514,"skipped_tests":912}
…ith configurable:false
Result: {"status":"keep","failures":67,"passing_tests":1515,"skipped_tests":912}
…port correct constructor identity
Result: {"status":"keep","failures":66,"passing_tests":1516,"skipped_tests":912}
…rget callability
Result: {"status":"keep","failures":65,"passing_tests":1517,"skipped_tests":912}
…totype for list/qb_arr heap data
Result: {"status":"keep","failures":64,"passing_tests":1518,"skipped_tests":912}
…lass fields, array proto setters, for-in member LHS)
Result: {"status":"keep","failures":64,"passing_tests":1518,"skipped_tests":912}
…ptured_locals for shared cell refs
Result: {"status":"keep","failures":63,"passing_tests":1519,"skipped_tests":912}
Result: {"status":"keep","failures":62,"passing_tests":1520,"skipped_tests":912}
…er changes.
Result: {"status":"keep","failures":62,"passing_tests":1520,"skipped_tests":912}
…ototype for accessors on OOB indices, put_array_el refreshes persistent globals after
Result: {"status":"keep","failures":61,"passing_tests":1521,"skipped_tests":912}
…ll with-statement scope (unfixable without deep refactor).
Result: {"status":"keep","failures":61,"passing_tests":1521,"skipped_tests":912}
…/put_ref_value stack format. Eliminates all 23 unimplemented_opcode crashes.
Result: {"status":"keep","failures":61,"passing_tests":1521,"skipped_tests":912}
…rmats. Eliminates 23 opcode crashes in with-scope tests (no net test improvement but tests progress further).
Result: {"status":"keep","failures":61,"passing_tests":1521,"skipped_tests":912}
… invoking getter side effects during property existence check. -14 failures!
Result: {"status":"keep","failures":47,"passing_tests":1535,"skipped_tests":912}
… fix + 9 via make_*_ref 2-value push. 96.9% pass rate.
Result: {"status":"keep","failures":47,"passing_tests":1535,"skipped_tests":912}
…var_ref cells now update ctx.globals and globalThis. -21 failures!
Result: {"status":"keep","failures":26,"passing_tests":1556,"skipped_tests":912}
…sting keys). Fixes p5 creation inside with-scope. -12 failures!
Result: {"status":"keep","failures":14,"passing_tests":1568,"skipped_tests":912}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a second QuickJS execution backend on the BEAM.
What’s in here
:beambackend viaQuickBEAM.disasm/2mode: :beamsupport in the public APIrequire(), module loading, dynamic import, globals, handlers, and interop for the VM pathError.captureStackTraceRuntime coverage
Object,Array,Function,String,Number,BooleanMath,JSON,Date,RegExpMap,Set,WeakMap,WeakSet,SymbolPromise,async/await, generators, async generatorsProxy,ReflectTypedArray,ArrayBuffer,BigIntsuper, private fields, private methods, private accessors, static private members, brand checksValidation
QUICKBEAM_BUILD=1 MIX_ENV=test mix testMIX_ENV=test QUICKBEAM_BUILD=1 mix test test/vm/js_engine_test.exs --include js_engine --seed 0mix compile --warnings-as-errorsmix format --check-formattedmix credo --strictmix dialyzermix ex_dnazlint lib/quickbeam/*.zig lib/quickbeam/napi/*.zigbunx oxlint -c oxlint.json --type-aware --type-check priv/ts/bunx jscpd lib/quickbeam/*.zig priv/ts/*.ts --min-tokens 50 --threshold 0Current local result:
2363 tests, 0 failures, 1 skipped, 54 excluded